(hexl-mode): Bind inhibit-read-only; don't alter buffer-read-only.
authorRichard M. Stallman <rms@gnu.org>
Mon, 7 Feb 1994 05:42:40 +0000 (05:42 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 7 Feb 1994 05:42:40 +0000 (05:42 +0000)
lisp/hexl.el

index 37b17cb76584e4b18c519859b34794b30cbf9a77..c75d5dfcca2bf4e407d602662c8243d84fb26e4e 100644 (file)
@@ -171,16 +171,14 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode.
     (add-hook 'write-contents-hooks 'hexl-save-buffer)
 
     (let ((modified (buffer-modified-p))
-         (read-only buffer-read-only)
+         (inhibit-read-only t)
          (original-point (1- (point))))
       (if (not (or (eq arg 1) (not arg)))
-;; if no argument then we guess at hexl-max-address
+         ;; if no argument then we guess at hexl-max-address
           (setq hexl-max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15))
-        (setq buffer-read-only nil)
         (setq hexl-max-address (1- (buffer-size)))
         (hexlify-buffer)
         (set-buffer-modified-p modified)
-        (setq buffer-read-only read-only)
         (hexl-goto-address original-point)))))
 
 (defvar hexl-in-save-buffer nil)